Answer:

There are two tasks:

  1. Get the number of gallons.
  2. Calculate and print the number of quarts.

Translating Task Descriptions into a Program

sequence of tasks in converting gallons to quarts

You might have decided that the tasks were:

  1. Get the number of gallons.
  2. Calculate the number of quarts.
  3. Print the number of quarts.

This answer is as good as the first. Here is a program that folllows the first plan:

' Get the number of gallons
PRINT "How many gallons"
INPUT GALLONS
'
' Calculate and print the number of quarts
PRINT "The number of quarts is", GALLONS * 4
'
END

QUESTION 11:

Write a program that achieves the following tasks:

  1. Get the number of weeks.
  2. Calculate and print the number of days.